package com.fen.common;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
* @Description:全局异常类
* @Author: lijiafen
* @Date:  2021/10/28
* @Time: 20:26
* @eamil: 2368044269@qq.com
*/
/*@RestControllerAdvice
@Slf4j*/
public class BaseExceptionHandler{
    @ExceptionHandler(value = Exception.class)
    public Result exception(Exception e){
     /*   log.error("异常信息：{}", e.getMessage());*/
        return Result.getFailure().setDate(e.getMessage());
    }
}
